
/* -*- C++ -*- */

//=============================================================================
/*
* @author Feloweria <380374483@qq.com>
* Copyright (C) Feloweria
*
* $ID 2014-07-03 15:04:05 AM
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*
* @version 1.0
*/
//=============================================================================

#ifndef FLOWRIA_INPUT_STREAM_INCLUDE
#define FLOWRIA_INPUT_STREAM_INCLUDE

#include "IO/InputStream.h"

FELOWRIA_BEGINE

class DataInputStream :public InputStream
{
public:
	DataInputStream(char *data,char *data_end);
	~DataInputStream();
	
public:
	virtual int32 Writable() const;
	virtual void Writable(char *&wdPtr, int32 &size);

public:
	virtual bool Write(const char *bytes, uint32 size);
	virtual bool WritePeek(const char *bytes, uint32 size);
	virtual bool WriteSkip(uint32 size);

public:
	virtual int32 WriteSize() const;

private:
	char *data;
	char *data_end;

};// class DataInputStream

FELOWRIA_END

#include "IO/DataInputStream.inl"

#endif // FLOWRIA_INPUT_STREAM_INCLUDE